home *** CD-ROM | disk | FTP | other *** search
- Path: nova.umuc.edu!not-for-mail
- From: srussell@nova.umuc.edu (Steve Russell)
- Newsgroups: comp.lang.c++
- Subject: random numbers
- Date: 15 Mar 1996 15:41:36 -0500
- Organization: University of Maryland University College
- Message-ID: <4ickm0$m8l@nova.umuc.edu>
- NNTP-Posting-Host: nova.umuc.edu
-
- I just got a project from an instructor for what should be a
- simple program --- simulating the roll of the dice. The whole
- thing is executing the stdlib.h function rand() ( rand()%6+1)
- to get a random number between 1 & 6.
-
- The problem is I keep getting the *same* number. I didn't
- read the library description, I don't have my book with me
- and it is a 45min walk home. I assumed it was of type int
- and needed no inputs.
-
- Does anybody know anything about this function?
-
- Thanks
- Steve
-